﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GameSushi.TweenEngine
{
    public abstract class ITweenAccessor
    {
        internal abstract int _GetValues(object target, int tweenType, float[] returnValues);
        internal abstract void _SetValues(object target, int tweenType, float[] newValues);
    }

    public abstract class TweenAccessor<T> : ITweenAccessor 
        where T : class
    {
        public abstract int GetValues(T target, int tweenType, float[] returnValues);

        public abstract void SetValues(T target, int tweenType, float[] newValues);

        internal sealed override int _GetValues(object target, int tweenType, float[] returnValues)
        {
            return GetValues(target as T, tweenType, returnValues);
        }

        internal sealed override void _SetValues(object target, int tweenType, float[] newValues)
        {
            SetValues(target as T, tweenType, newValues);
        }
    }
}
